package com.common.core;


import android.support.multidex.MultiDexApplication;

import com.common.core.commonBean.RequestPublicHeadParamsInfo;
import com.common.core.utils.ContextProvider;

/**
 * Created by Administrator on 2016/1/14.
 */
public class CommonCoreApplication extends MultiDexApplication {
    protected RequestPublicHeadParamsInfo mHeadParamsInfo;
    @Override
    public void onCreate() {
        super.onCreate();
        mHeadParamsInfo = new RequestPublicHeadParamsInfo();
        ContextProvider.initIfNotInited(this);
    }

    @Override
    public void onTerminate() {
        super.onTerminate();
        ContextProvider.destoryContext();
    }

    protected void init(boolean debug, RequestPublicHeadParamsInfo mHeadParamsInfo) {
        ContextProvider.init(this);
        CoreConfiguration.initConfig(debug, mHeadParamsInfo);
    }

}
